﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Runda.CMS.Portal.Lookup
{
    public partial class selectcustomeroflookup : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["title"] != null && Request.QueryString["title"] != "")
            {
                string strtitle = System.Web.HttpUtility.UrlDecode(Request.QueryString["title"].ToString());
                string str = "";
                if (strtitle.Equals("customer"))
                {
                    str = "/Lookup/selectcustomer.aspx?lookup=1";
                    if (Request.QueryString["rank"] != null)
                    {
                        str = "/Lookup/selectcustomer.aspx?lookup=1&rank=" + Request.QueryString["rank"].ToString();
                    }
                    if (Request.QueryString["Salor"] != null) {
                        str = "/Lookup/selectcustomer.aspx?lookup=1&Salor=" + Request.QueryString["Salor"].ToString();
                    }
                }
                if (strtitle.Equals("user")) {
                    str = "/Lookup/selectuser.aspx?lookup=1";
                    if (Request.QueryString["department"] != null) {
                        str = "/Lookup/selectuser.aspx?lookup=1&department=" + Request.QueryString["department"].ToString();
                    }
                }
                this.Label1.Text = "<IFRAME id='ctl_iframe_show' name='ctl_iframe_show' src='" + str + "' frameBorder='no' align='center' width='100%' scrolling='no' height='100%'> </IFRAME>";
                if (this.Request.QueryString["title"] != null)
                {
                    this.Response.Write("<script>document.title=\"" + this.Request.QueryString["title"] + "\"</script>");
                }
            }
        }
    }
}
